package com.sheyu.mall.ware.config;

import com.sheyu.mall.ware.interceptor.CORSInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author sheyu
 * @Desciption:
 * @date 2020/9/14 11:49 下午
 */
public class WareWebConfig implements WebMvcConfigurer {

    @Autowired
    private CORSInterceptor corsInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(corsInterceptor);
    }
}
